package com.csjy.migration.hnnd.workflow;

import com.csjy.migration.hnnd.DbUtil;
import com.csjy.migration.hnnd.ProgramArgument;
import com.csjy.migration.hnnd.annotation.Task;
import com.csjy.migration.hnnd.business.NdBpmFeeCollectionRecord;
import com.csjy.migration.hnnd.business.SourceBusinessData;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 客户退费申请
 */
public class ItemRefundFareHny extends WorkflowMigration {

    private NdBpmFeeCollectionRecord ndBpmFeeCollectionRecord = null;

    public ItemRefundFareHny(DbUtil sourceDbUtil, DbUtil targetDbUtil, SourceBusinessData sourceData, ProgramArgument programArgument, String projectId, String procInstId, Map procInstRow) throws Exception {
        super(sourceDbUtil, targetDbUtil, sourceData, programArgument, projectId, procInstId, procInstRow);
        customInitData();
    }

    @Override
    public void customInitData() throws Exception {
        this.curBizType = "khtf";
        this.ndBpmFeeCollectionRecord = new NdBpmFeeCollectionRecord(sourceDbUtil,targetDbUtil,sourceData,programArgument,projectId,procInstId);

    }

    @Override
    public void customInsertOrUpdateData() throws Exception {
        this.ndBpmFeeCollectionRecord.start();

    }




    @Task("客户退费流程@项目经理提交申请")
    public void khtflcxmjltjsq() throws Exception{
        this.curAffixType = "sqdj";
        this.curModelMap.put("all",new String[] {"task1535443464639xyb","下一步"});
        this.setCommonData(true,null);
        this.ndBpmFeeCollectionRecord.getTaskParamMap().put(this.curJbpmTaskInstanceId, this.initTaskParamMap());
    }

    @Task("客户退费流程@部门负责人审核")
    public void khtflcbmfzrsh() throws Exception {
        this.curModelMap.put("通过",new String[] {"task1535443482380tg","通过"});
        this.curModelMap.put("退回",new String[] {"驳回","驳回"});
        this.curModelMap.put("不通过",new String[] {"endbtg","不通过"});
        this.setCommonData(false,null);
    }

    @Task("客户退费流程@风控副经理审核")
    public void khtflcfkfjlsh() throws Exception {
        this.curModelMap.put("通过",new String[] {"task1577960609898tg","通过"});
        this.curModelMap.put("退回",new String[] {"驳回","驳回"});
        this.curModelMap.put("不通过",new String[] {"endbtg","不通过"});
        this.setCommonData(false,null);
    }

    @Task("客户退费流程@风控部经理审核")
    public void khtflcfkfbjlsh() throws Exception {
        this.khtflcfkfjlsh();
    }

    @Task("客户退费流程@风控副总审核")
    public void khtflcfkfzsh() throws Exception {
        this.curModelMap.put("通过",new String[] {"task1555382895812tg","通过"});
        this.curModelMap.put("退回",new String[] {"驳回","驳回"});
        this.curModelMap.put("不通过",new String[] {"endbtg","不通过"});
        this.setCommonData(false,null);
    }

    @Task("客户退费流程@财务部经理审核")
    public void khtflccwbjlsh() throws Exception {
        this.curModelMap.put("通过",new String[] {"task1535443508494tg","通过"});
        this.curModelMap.put("退回",new String[] {"驳回","驳回"});
        this.curModelMap.put("不通过",new String[] {"endbtg","不通过"});
        this.setCommonData(false,null);
    }

    @Task("客户退费流程@业务副总审批")
    public void khtflcxywfzsp() throws Exception {
        this.curModelMap.put("通过",new String[] {"task1563503766558tg","通过"});
        this.curModelMap.put("不通过",new String[] {"endbtg","不通过"});
        this.setCommonData(false,null);
    }


    @Task("客户退费流程@财务副总审核")
    public void khtflccwfzsh() throws Exception {
        this.curModelMap.put("通过",new String[] {"task1535443540388tg","通过"});
        this.curModelMap.put("退回",new String[] {"驳回","驳回"});
        this.curModelMap.put("不通过",new String[] {"endbtg","不通过"});
        this.setCommonData(false,null);
    }

    @Task("客户退费流程@财务副总审批")
    public void khtflcxcwfzsp() throws Exception {
        this.khtflccwfzsh();
    }

    @Task("客户退费流程@总经理审批")
    public void khtflczjlsp() throws Exception {
        this.curModelMap.put("通过",new String[] {"task1535443559672tg","通过"});
        this.curModelMap.put("不通过",new String[] {"endbtg","不通过"});
        this.setCommonData(false,null);
    }

    @Task("客户退费流程@董事长审批")
    public void khtflcdszsp() throws Exception {
        this.curModelMap.put("通过",new String[] {"task1535443576474tg","通过"});
        this.curModelMap.put("不通过",new String[] {"endbtg","不通过"});
        this.setCommonData(false,null);
    }

    @Task("客户退费流程@财务出纳退费")
    public void khtflccwcntf() throws Exception{
        this.curModelMap.put("all",new String[] {"endjs","结束"});
        this.setCommonData(false,null);
        this.ndBpmFeeCollectionRecord.getTaskParamMap().put(this.curJbpmTaskInstanceId,  this.initTaskParamMap());
    }

}
